import Taro from "@/package";

export default () => {
  const routerObj = Taro.useRouter(true);
  console.log(Taro, routerObj);
  const handleOnClick = () => {
    // Taro.navigateTo({ url: "/pages/index/index?_=/abc" });
    // Taro.navigateTo({ url: "/route/index?_=/abc" });
    Taro.navigateBack({ delta: 1 });
  };
  const navtoRouteIndex = () => {
    Taro.navigateTo({ url: "/route/index?_=/abc" });
  };
  return (
    <div className="App">
      <h1>App</h1>
      <button onClick={handleOnClick}>Go to back</button>
      <button onClick={navtoRouteIndex}>Go to route index</button>
    </div>
  );
};
